package org.example;

//TIP 要<b>运行</b>代码，请按 <shortcut actionId="Run"/> 或
// 点击装订区域中的 <icon src="AllIcons.Actions.Execute"/> 图标。
public class Main {
    public static void main(String[] args) {
        // 创建不同类型的商品
        Product food = new Food("F001", "牛奶", 5.5, 100, "2023-12-31", "内蒙古");
        Product daily = new DailyNecessity("001", "毛巾", 15.0, 50, "纯棉", true);
        Product electronic = new Electronics("002", "手机", 2999.0, 30, "华为", 24);

        // 显示商品信息
        System.out.println("===== 食品信息 =====");
        food.result();

        System.out.println("\n===== 日用品信息 =====");
        daily.result();

        System.out.println("\n===== 电子产品信息 =====");
        electronic.result();

    }
}